//import hcemLoginMixin from '@/utils/jobDictMixin.js'  //在需要引入的组件中引入
import { setToken } from '@/utils/auth'
import { getQuesSystemToken } from "@/api/login";

export default {
	//mixins: [jobDictMixin],
	data() {
		return {
			//jobMyList: []
		}
	},
	async created() {
		await this.codeToToken()

		// await this.getStatus()
		// this.getHosList()
		// this.getList();
	  },
	  methods: {
		async codeToToken(code) {
		  // console.log('进入请求');
		  let phoneNumber = localStorage.getItem('phonenumber') || ''
		  let res = await getQuesSystemToken({phoneNumber:phoneNumber})
		  //let res = await getQuesSystemToken({ "code": code })
		  if (res.code == 200) {
			//this.$router.push({path:'/home'})
			this.$store.commit('SET_TOKEN', res.data)
			setToken(res.data)
		   // this.$router.push({ path: this.redirect || "/" }).catch(() => { });
		  }
		  console.log(res, 'getQuesSystemToken');
		}
	}
}